package com.lzy.stock_ranking_system.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import com.lzy.stock_ranking_system.Bean.*;

public class BeanList {
    static Map<String, ArrayList<zcfzbBean>> zcfzbBeanMap = new HashMap<>();
    static Map<String, ArrayList<lrbBean>> lrbBeanMap = new HashMap<>();
    static Map<String, ArrayList<xjllbBean>> xjllbBeanMap = new HashMap<>();
    static String[] codes;

    public static Map<String, ArrayList<zcfzbBean>> getZcfzbBeanMap() {
        return zcfzbBeanMap;
    }

    public static void setZcfzbBeanMap(Map<String, ArrayList<zcfzbBean>> Map) {
        zcfzbBeanMap = Map;
    }

    public static Map<String, ArrayList<lrbBean>> getLrbBeanMap() {
        return lrbBeanMap;
    }

    public static void setLrbBeanMap(Map<String, ArrayList<lrbBean>> Map) {
        lrbBeanMap = Map;
    }

    public static Map<String, ArrayList<xjllbBean>> getXjllbBeanMap() {
        return xjllbBeanMap;
    }

    public static void setXjllbBeanMap(Map<String, ArrayList<xjllbBean>> Map) {
        xjllbBeanMap = Map;
    }

    public static String[] getCodes() {
        setCodes();
        return codes;
    }

    public static void setCodes() {
        String code=Codes.Acodes;
        String[] split = code.split("&");
        codes=new String[split.length];
        for (int i = 0; i < split.length; i++) {
            if(split[i].charAt(0)=='6'){
                codes[i]="SH"+split[i];
            }else {
                codes[i]="SZ"+split[i];
            }
        }
    }
}
